/*
 *  AudioFileBrowser.cpp
 *  resampling_test
 *
 *  Created by David Rowland on 30/03/2009.
 *  Copyright 2009 UWE. All rights reserved.
 *
 */

#include "AudioFileBrowser.h"

AudioFileBrowser::AudioFileBrowser(WildcardFileFilter *filesToDisplay_)
	:	FileBrowserComponent(FileBrowserComponent::loadFileMode,
							 File::getSpecialLocation(File::userDesktopDirectory),
							 filesToDisplay_,
							 0)
{
	filesToDisplay = filesToDisplay_;
}

AudioFileBrowser::~AudioFileBrowser()
{
	deleteAndZero(filesToDisplay);
}

void AudioFileBrowser::fileClicked(const File &f, const MouseEvent &e)
{
	if (f.existsAsFile())
	{
		StringArray files;
		files.add(f.getFullPathName());
		performExternalDragDropOfFiles(files, false);
	}
}